Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

o/snapstate, o/devicestate: remodel with components from the store #14933

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

andrewphelpsj
Copy link
Member

@andrewphelpsj andrewphelpsj commented Jan 15, 2025

This change enables us to do a remodel that includes components from the store. This is a little incomplete, as I discovered that I need to handle the case where we swap to an already installed kernel (leftover from a previous remodeling) that may have some components already installed. This is a small edge case, and will not change most of the PR.

Based on #14939 for now.

Copy link

github-actions bot commented Jan 15, 2025

Thu Jan 16 21:32:29 UTC 2025
The following results are from: https://github.com/canonical/snapd/actions/runs/12815844218

Failures:

Preparing:

  • google-nested:ubuntu-20.04-64:tests/nested/manual/core20-new-snapd-does-not-break-old-initrd:startwithnew
  • google-nested:ubuntu-20.04-64:tests/nested/manual/core20-to-core22
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-15.6-64
  • openstack:opensuse-15.6-64
  • openstack:opensuse-15.6-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-15.6-64
  • openstack:opensuse-15.6-64:tests/main/
  • google:ubuntu-18.04-64:tests/regression/lp-1871652

Executing:

  • google-distro-1:debian-11-64:tests/main/confdb-cross-config
  • google-nested:ubuntu-20.04-64:tests/nested/manual/recovery-system:no_test_or_default
  • google-nested:ubuntu-20.04-64:tests/nested/manual/recovery-system:tested
  • google-nested:ubuntu-20.04-64:tests/nested/manual/recovery-system:default
  • google-nested:ubuntu-20.04-64:tests/nested/manual/remodel-offline:installed_snaps
  • google-nested:ubuntu-20.04-64:tests/nested/manual/recovery-system:tested_and_default
  • google-nested:ubuntu-22.04-64:tests/nested/manual/recovery-system:default
  • google-nested:ubuntu-22.04-64:tests/nested/manual/recovery-system-reboot:factory_reset
  • google-nested:ubuntu-22.04-64:tests/nested/manual/recovery-system-reboot:install
  • google-nested:ubuntu-22.04-64:tests/nested/manual/recovery-system:tested
  • google-nested:ubuntu-22.04-64:tests/nested/manual/recovery-system:tested_and_default
  • google-nested:ubuntu-22.04-64:tests/nested/manual/recovery-system:no_test_or_default
  • google-nested:ubuntu-22.04-64:tests/nested/manual/recovery-system-reboot:recover
  • google-nested:ubuntu-22.04-64:tests/nested/manual/muinstaller-real:seeded
  • google-nested:ubuntu-24.04-64:tests/nested/manual/recovery-system:default
  • google-nested:ubuntu-24.04-64:tests/nested/manual/hybrid-remodel
  • google-nested:ubuntu-24.04-64:tests/nested/core/core20-kernel-failover:nolink
  • google-nested:ubuntu-24.04-64:tests/nested/manual/recovery-system-reboot:install
  • google-nested:ubuntu-24.04-64:tests/nested/manual/muinstaller-real:seeded
  • google-nested:ubuntu-24.04-64:tests/nested/manual/remodel-min-size
  • google-nested:ubuntu-24.04-64:tests/nested/manual/recovery-system:no_test_or_default
  • google-nested:ubuntu-24.04-64:tests/nested/manual/recovery-system-reboot:recover
  • google-nested:ubuntu-24.04-64:tests/nested/manual/recovery-system:tested
  • google-nested:ubuntu-24.04-64:tests/nested/manual/recovery-system:tested_and_default
  • google-nested:ubuntu-24.04-64:tests/nested/manual/muinstaller-real:partial
  • google-nested:ubuntu-24.04-64:tests/nested/manual/recovery-system-reboot:factory_reset
  • google-nested:ubuntu-24.04-64:tests/nested/manual/muinstaller-real:encrypted
  • google-core:ubuntu-core-18-64:tests/core/gadget-update-pc
  • google-core:ubuntu-core-18-64:tests/core/kernel-base-gadget-pair-single-reboot:kernel_base
  • google:ubuntu-25.04-64:tests/main/cgroup-devices-v2
  • google:ubuntu-20.04-64:tests/main/lxd:snapd_cgroup_neither
  • google:ubuntu-24.10-64:tests/main/try
  • google:ubuntu-24.10-64:tests/main/interfaces-auditd-support
  • google:ubuntu-18.04-64:tests/main/snap-user-service-start-on-install

Restoring:

  • google-nested:ubuntu-22.04-64:tests/nested/manual/muinstaller-real:seeded
  • google-nested:ubuntu-22.04-64:tests/nested/manual/
  • google-nested:ubuntu-22.04-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-15.6-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-tumbleweed-64
  • openstack:opensuse-15.6-64
  • openstack:opensuse-15.6-64:tests/main/postrm-purge
  • google-core:ubuntu-core-18-64:tests/core/gadget-update-pc
  • google-core:ubuntu-core-18-64:tests/core/
  • google-core:ubuntu-core-18-64
  • google:ubuntu-18.04-64:tests/regression/lp-1871652

@andrewphelpsj andrewphelpsj force-pushed the remodel-components-from-store branch from 7e4bd1c to 9d70ca3 Compare January 15, 2025 21:51
…mponent-setup when installing a snap with components

This indicates to ifacestate's setup-profiles handler that the
setup-profiles should operate on a snap and a set of components, rather
than a single component.
@andrewphelpsj andrewphelpsj force-pushed the remodel-components-from-store branch from 9d70ca3 to f291bf0 Compare January 16, 2025 19:06
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 81.71429% with 32 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@846e5de). Learn more about missing BASE report.
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
overlord/devicestate/devicestate.go 75.23% 17 Missing and 9 partials ⚠️
overlord/snapstate/component.go 90.62% 2 Missing and 1 partial ⚠️
overlord/snapstate/snapstate.go 91.42% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #14933   +/-   ##
=========================================
  Coverage          ?   78.12%           
=========================================
  Files             ?     1159           
  Lines             ?   153588           
  Branches          ?        0           
=========================================
  Hits              ?   119993           
  Misses            ?    26192           
  Partials          ?     7403           
Flag Coverage Δ
unittests 78.12% <81.71%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

snapsupTask = t
break
}
t := ts.MaybeEdge(snapstate.SnapSetupEdge)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedronis here is where the new edge is used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant